import request from '@/utils/request.js'


/**
 * 告警规则新增、编辑
 * @param data
 * @returns {*}
 */
export const submit = (data) => {
  return request({
    url: `warning/warningRule/submit`,
    method: 'post',
    data
  })
}

/**
 * 分页查询
 */
export const page = (current, size, params) => {
  return request({
    url: `warning/warningRule/page`,
    method: 'get',
    params: {
      ...params,
      pageNo: current,
      pageSize: size,
    }
  })
}

/**
 * 详情
 */
export const detail = (id) => {
  return request({
    url: `warning/warningRule/detail`,
    method: 'get',
    params: {
      id
    }
  })
}

/**
 * 逻辑删除
 */
export const remove = (ids) => {
  return request({
    url: `warning/warningRule/remove`,
    method: 'post',
    params: {
      ids
    }
  })
}
